<!--
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/order/storesrequisition/StoresRequisition.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/order/storesrequisition/StoresRequisition.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'Id',
                footer: "Foots",
                cnName: '领料清单',
                name: 'storesrequisition/StoresRequisition',
                url: "/StoresRequisition/",
                sortName: "CreateDate",
                foreignKey:"SRId"
            });
            const editFormFields = ref({"SRNumber":"","State":"","CreateDate":"","CompletionTime":"","ModifyDate":""});
            const editFormOptions = ref([[{"title":"领料单号","field":"SRNumber"},
                               {"title":"料单状态","field":"State","type":"number"},
                               {"title":"生成时间","field":"CreateDate"}],
                              [{"title":"完成时间","field":"CompletionTime"},
                               {"title":"修改时间","field":"ModifyDate"}]]);
            const searchFormFields = ref({"SRNumber":""});
            const searchFormOptions = ref([[{"title":"领料单号","field":"SRNumber"}]]);
            const columns = ref([{field:'Id',title:'主键',type:'string',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'SRNumber',title:'领料单号',type:'string',link:true,width:110,align:'left',sort:true},
                       {field:'State',title:'料单状态',type:'int',width:110,align:'left'},
                       {field:'CreateDate',title:'生成时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'CompletionTime',title:'完成时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'CreateUserId',title:'添加人ID',type:'string',width:110,hidden:true,align:'left'},
                       {field:'CreateUserName',title:'添加人',type:'string',width:110,align:'left'},
                       {field:'ModifyUserName',title:'修改人',type:'string',width:110,align:'left'},
                       {field:'ModifyUserId',title:'修改人ID',type:'string',width:110,hidden:true,align:'left'},
                       {field:'ModifyDate',title:'修改时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'DeletionFlag',title:'删除标识',type:'int',width:110,hidden:true,align:'left'}]);
            const detail = ref({
                cnName: "清单明细",
                table: "StoresRequisitionDetailed",
                columns: [],
                sortName: "MaterialId",
                key: "Id"
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
